import React, { memo } from 'react'
import { LeftWrapper } from './style'
import IconLogo from '@/assets/svg/icon_logo'
import { useNavigate } from 'react-router-dom'

const HeaderLeft = memo(() => {
  const navigate = useNavigate()
  // 点击logo跳转到首页
  function navigateToHome(){
    navigate('/home')
  }
  return (
    <LeftWrapper>
        <div className='logo' onClick={navigateToHome}>
            <IconLogo/>
        </div>
    </LeftWrapper>
  )
})

export default HeaderLeft